package com.itc.bi.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itc.bi.dto.DataSynPrarmDto;
import com.itc.bi.dto.DataTableSynPrarmDto;
import com.itc.bi.entity.DatasourceEntity;
import com.itc.bi.entity.TableEntity;
import com.itc.bi.query.TableQuery;
import com.itc.bi.vo.TablesVo;

import java.util.List;

public interface TableService extends IService<TableEntity> {

    Page page(TableQuery query);
    List<TableEntity> list(TableQuery query);
    void buildExInfo(TableEntity data);
    void buildExInfo(List<TableEntity> list);

    void initTable(DatasourceEntity entity);
    void deleteByDatasourceId(Long datasourceId);

    /**
     * 获取表数据
     * @param synPrarmDto
     * @return
     */
    List<TablesVo> getTables(DataTableSynPrarmDto synPrarmDto);

    /**
     * 获取改表是否已存在数据集tb_direct_data_set
     * @param tableId
     * @param tableName
     * @return
     */
    int getDataSetNum(Long tableId,String tableName);

    void updateByDatasourceId(Long datasourceId);
}
